package cn.edu.sjtu.se.dslab.dao;

import java.util.List;

import cn.edu.sjtu.se.dslab.action.bean.PageBean;
import cn.edu.sjtu.se.dslab.auth.User;
import cn.edu.sjtu.se.dslab.exception.DBException;

public interface IUserDao {

	public User validUser(String username, String password);
	
	public void save(User user);

    public void update(User user);
    
    public long rowCount();

    public User queryById(long id);
    
    public User queryByUserName(String username);

    public void delete(User user);

    public void deleteById(long id);

    public List<User> queryAll();
    
    public List<User> queryByProperty(String text);
    
    public PageBean<User> queryByPage(int pageNum, int pageSize)  throws DBException;
}
